/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.ibm.law.domain;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author shanch
 */
@Entity
@Table(name = "institute")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Institute.findAll", query = "SELECT i FROM Institute i"),
    @NamedQuery(name = "Institute.findById", query = "SELECT i FROM Institute i WHERE i.id = :id"),
    @NamedQuery(name = "Institute.findByName", query = "SELECT i FROM Institute i WHERE i.name = :name"),
    @NamedQuery(name = "Institute.findByLisenceNo", query = "SELECT i FROM Institute i WHERE i.lisenceNo = :lisenceNo"),
    @NamedQuery(name = "Institute.findByRepresentative", query = "SELECT i FROM Institute i WHERE i.representative = :representative"),
    @NamedQuery(name = "Institute.findByPersonInCharge", query = "SELECT i FROM Institute i WHERE i.personInCharge = :personInCharge"),
    @NamedQuery(name = "Institute.findByBusinessScope", query = "SELECT i FROM Institute i WHERE i.businessScope = :businessScope"),
    @NamedQuery(name = "Institute.findByExpireDate", query = "SELECT i FROM Institute i WHERE i.expireDate = :expireDate"),
    @NamedQuery(name = "Institute.findByAuthority", query = "SELECT i FROM Institute i WHERE i.authority = :authority"),
    @NamedQuery(name = "Institute.findByAddress", query = "SELECT i FROM Institute i WHERE i.address = :address"),
    @NamedQuery(name = "Institute.findByZipcode", query = "SELECT i FROM Institute i WHERE i.zipcode = :zipcode"),
    @NamedQuery(name = "Institute.findByTel", query = "SELECT i FROM Institute i WHERE i.tel = :tel"),
    @NamedQuery(name = "Institute.findByFax", query = "SELECT i FROM Institute i WHERE i.fax = :fax"),
    @NamedQuery(name = "Institute.findByCellphone", query = "SELECT i FROM Institute i WHERE i.cellphone = :cellphone"),
    @NamedQuery(name = "Institute.findByEmail", query = "SELECT i FROM Institute i WHERE i.email = :email"),
    @NamedQuery(name = "Institute.findByWebsite", query = "SELECT i FROM Institute i WHERE i.website = :website"),
    @NamedQuery(name = "Institute.findByAccountNo", query = "SELECT i FROM Institute i WHERE i.accountNo = :accountNo"),
    @NamedQuery(name = "Institute.findByAccountName", query = "SELECT i FROM Institute i WHERE i.accountName = :accountName"),
    @NamedQuery(name = "Institute.findByAccountBank", query = "SELECT i FROM Institute i WHERE i.accountBank = :accountBank"),
    @NamedQuery(name = "Institute.findByLisencePath", query = "SELECT i FROM Institute i WHERE i.lisencePath = :lisencePath")})
public class Institute extends AbstractModelObject implements Serializable  {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "id")
    private Long id;
    @Column(name = "name")
    private String name;
    @Column(name = "lisence_no")
    private String lisenceNo;
    @Column(name = "representative")
    private String representative;
    @Column(name = "person_in_charge")
    private String personInCharge;
    @Column(name = "business_scope")
    private String businessScope;
    @Column(name = "expire_date")
    @Temporal(TemporalType.DATE)
    private Date expireDate;
    @Column(name = "authority")
    private String authority;
    @Column(name = "address")
    private String address;
    @Column(name = "zipcode")
    private String zipcode;
    @Column(name = "tel")
    private String tel;
    @Column(name = "fax")
    private String fax;
    @Column(name = "cellphone")
    private String cellphone;
    @Column(name = "email")
    private String email;
    @Column(name = "website")
    private String website;
    @Column(name = "account_no")
    private String accountNo;
    @Column(name = "account_name")
    private String accountName;
    @Column(name = "account_bank")
    private String accountBank;
    @Column(name = "lisence_path")
    private String lisencePath;

    public Institute() {
    }

    public Institute(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getLisenceNo() {
        return lisenceNo;
    }

    public void setLisenceNo(String lisenceNo) {
        this.lisenceNo = lisenceNo;
    }

    public String getRepresentative() {
        return representative;
    }

    public void setRepresentative(String representative) {
        this.representative = representative;
    }

    public String getPersonInCharge() {
        return personInCharge;
    }

    public void setPersonInCharge(String personInCharge) {
        this.personInCharge = personInCharge;
    }

    public String getBusinessScope() {
        return businessScope;
    }

    public void setBusinessScope(String businessScope) {
        this.businessScope = businessScope;
    }

    public Date getExpireDate() {
        return expireDate;
    }

    public void setExpireDate(Date expireDate) {
        this.expireDate = expireDate;
    }

    public String getAuthority() {
        return authority;
    }

    public void setAuthority(String authority) {
        this.authority = authority;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getZipcode() {
        return zipcode;
    }

    public void setZipcode(String zipcode) {
        this.zipcode = zipcode;
    }

    public String getTel() {
        return tel;
    }

    public void setTel(String tel) {
        this.tel = tel;
    }

    public String getFax() {
        return fax;
    }

    public void setFax(String fax) {
        this.fax = fax;
    }

    public String getCellphone() {
        return cellphone;
    }

    public void setCellphone(String cellphone) {
        this.cellphone = cellphone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getWebsite() {
        return website;
    }

    public void setWebsite(String website) {
        this.website = website;
    }

    public String getAccountNo() {
        return accountNo;
    }

    public void setAccountNo(String accountNo) {
        this.accountNo = accountNo;
    }

    public String getAccountName() {
        return accountName;
    }

    public void setAccountName(String accountName) {
        this.accountName = accountName;
    }

    public String getAccountBank() {
        return accountBank;
    }

    public void setAccountBank(String accountBank) {
        this.accountBank = accountBank;
    }

    public String getLisencePath() {
        return lisencePath;
    }

    public void setLisencePath(String lisencePath) {
        this.lisencePath = lisencePath;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Institute)) {
            return false;
        }
        Institute other = (Institute) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.ibm.law.entity.Institute[ id=" + id + " ]";
    }
    
}
